<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="../jsp/common/head.jsp" %>

<div class="right">
    <div class="location">
        <strong>你现在所在的位置是:</strong>
        <c:choose>
            <c:when test="${type == 1}">
                <span>临期合同管理页面</span>
            </c:when>
            <c:when test="${type == 2}">
                <span>过期合同管理</span>
            </c:when>
            <c:otherwise>
                <span>合同管理页面</span>
            </c:otherwise>
        </c:choose>
    </div>
    <input type="hidden" id="path" value="${pageContext.request.contextPath }">
    <div class="search">
        <form method="post" action="${pageContext.request.contextPath }/contract.html">
            <input type="hidden" name="pageIndex" value="1"/>
            <input type="hidden" name="type" value="${type}"/>
            <span>业务号：</span>
            <input name="businessCode" type="text" value="${businessCode }">

            <input value="查 询" type="submit" id="searchbutton">
            <a href="javascript:void(0)" id="addImport">导入合同</a>
            <a href="${pageContext.request.contextPath }/billadd.html">添加合同</a>
        </form>

        <input id="FileUpload" name="file" type="file" onchange="uploadWord()" style="display: none"/>
    </div>
    <!--账单表格 样式和供应商公用-->
    <table class="providerTable" cellpadding="0" cellspacing="0">
        <tr class="firstTr">
            <th>合同号</th>
            <th>流水号</th>
            <th>企业名称</th>
            <th>经办人</th>
            <th>手机号码</th>
            <th>业务号码</th>
            <th>入网时间</th>
            <th>月租金额</th>
            <th>合同期限</th>
            <th>到期日期</th>
            <th>付费方式</th>
            <th>业务类型</th>
            <th>带宽</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        <c:forEach var="bill" items="${page.list }" varStatus="status">
            <tr>
                <td><span>${bill.contractCode }</span></td>
                <td><span>${bill.flowCode }</span></td>
                <td><span>${bill.enterpriseName}</span></td>
                <td><span>${bill.agent}</span></td>
                <td><span>${bill.phone}</span></td>
                <td><span>${bill.businessCode}</span></td>
                <td><span>${bill.inDate}</span></td>
                <td><span>${bill.price}</span></td>
                <td><span>${bill.contractTerm}</span></td>
                    <%--<td><span><fmt:formatDate value="${bill.endDate}" pattern="yyyy-MM-dd"/></span></td>--%>
                <td><span>${bill.endDate}</span></td>
                <td><span>${bill.payment}</span></td>
                <td><span>${bill.businessType}</span></td>
                <td><span>${bill.bandwidth}</span></td>
                <td><span>${bill.state}</span></td>
                <td>
                    <span><a class="viewBill" href="javascript:;" billid=${bill.id } billcc=${bill.contractCode }><img
                            src="${pageContext.request.contextPath }/images/read.png" alt="查看" title="查看"/></a></span>
                    <span><a class="modifyBill" href="javascript:;" billid=${bill.id } billcc=${bill.contractCode }><img
                            src="${pageContext.request.contextPath }/images/xiugai.png" alt="修改" title="修改"/></a></span>
                    <span><a class="deleteBill" href="javascript:;" billid=${bill.id } billcc=${bill.contractCode }><img
                            src="${pageContext.request.contextPath }/images/schu.png" alt="删除" title="删除"/></a></span>
                    <c:if test="${type == 1}">
                        <span><a class="success" href="javascript:;" billid=${bill.id } billcc=${bill.contractCode }><img
                                src="${pageContext.request.contextPath }/images/y.png" alt="确认" title="确认" style="width: 22px;"/></a></span>
                    </c:if>
                </td>
            </tr>
        </c:forEach>
    </table>
    <input type="hidden" id="totalPageCount" value="${page.total}"/>
    <c:import url="rollpage.jsp">
        <c:param name="totalCount" value="${page.count}"/>
        <c:param name="currentPageNo" value="${page.index}"/>
        <c:param name="totalPageCount" value="${page.total}"/>
    </c:import>
</div>
</section>

<!--点击删除按钮后弹出的页面-->
<div class="zhezhao"></div>
<div class="remove" id="removeBi">
    <div class="removerChid">
        <h2>提示</h2>
        <div class="removeMain">
            <p>你确定要删除该合同吗？</p>
            <a href="#" id="yes">确定</a>
            <a href="#" id="no">取消</a>
        </div>
    </div>
</div>

<%@include file="../jsp/common/foot.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/billlist.js"></script>